s=list(input())
t=list(input())
n=len(s)
ans=0
# 逐一比对，只要能翻就翻
for i in range(n):
    if s[i]==t[i]:
        continue
    if s[i+1]=="*":
        s[i+1]="o"
    else:
        s[i+1]="*"
    ans+=1
print(ans)